#!/usr/bin/python
#  -*- coding: UTF-8 -*-
import psycopg2
# import hashlib
from config import sql_info
import psycopg2.extras
import json, os


class selectData(object):
    def __init__(self):
        self.conn = psycopg2.connect(database=sql_info["database"],
                                     user=sql_info["user"],
                                     password=sql_info["password"],
                                     host=sql_info['host'],
                                     port=sql_info["port"])
        self.cu = self.conn.cursor()
        # 返回字典形式
        self.cuu = self.conn.cursor(cursor_factory=psycopg2.
                                    extras.RealDictCursor)

    